package easy;

import java.util.HashSet;
import java.util.Set;

public class Solution_204 {

    public static int countPrimes(int n) {
        /*if (n==1 || n==0) {
            return 0;
        }*/
        int count = 0;
        for (int i = 2; i < n; i++) {
            boolean flag = true;
            for (int j = 2; j*j <= i; j++) {
                if (i%j==0) {
                    flag = false;
                    break;
                }
            }
            if (flag) {
                System.out.println(i);
                count++;
            }
        }
        return count;
    }

    public static void main(String[] args) {
        int[] a = { };
        System.out.println(countPrimes(10));
    }
}
